/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author wyr
 */
@Embeddable
public class NewsExtendsFirstchannelButtonsPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "channelid")
    private int channelid;
    @Basic(optional = false)
    @Column(name = "buttonid")
    private int buttonid;

    public NewsExtendsFirstchannelButtonsPK() {
    }

    public NewsExtendsFirstchannelButtonsPK(int channelid, int buttonid) {
        this.channelid = channelid;
        this.buttonid = buttonid;
    }

    public int getChannelid() {
        return channelid;
    }

    public void setChannelid(int channelid) {
        this.channelid = channelid;
    }

    public int getButtonid() {
        return buttonid;
    }

    public void setButtonid(int buttonid) {
        this.buttonid = buttonid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) channelid;
        hash += (int) buttonid;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NewsExtendsFirstchannelButtonsPK)) {
            return false;
        }
        NewsExtendsFirstchannelButtonsPK other = (NewsExtendsFirstchannelButtonsPK) object;
        if (this.channelid != other.channelid) {
            return false;
        }
        if (this.buttonid != other.buttonid) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.NewsExtendsFirstchannelButtonsPK[channelid=" + channelid + ", buttonid=" + buttonid + "]";
    }

}
